<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8" />
  <meta http-equiv="X-UA-Compatible" content="IE=edge" />
  <meta name="viewport" content="width=device-width, initial-scale=1.0" />
  <title>Document</title>
</head>
<script src="./js/Cook.js"></script>
<script src="./js/_ajax.js"></script>
<!-- <link rel="stylesheet" href="./font/iconfont.css"> -->
<!-- <link rel="stylesheet" href="./font_78xmwrbhrzu/iconfont.css"> -->
<style>
  ul {
    width: 894px;
    list-style: none;
    margin: 0 auto;
  }

  ul li {
    height: 91px;
    display: flex;
  }

  .imgx {
    width: 50px;
    position: relative;
  }

  .imgx div {
    width: 100%;
    height: 50px;
    margin: auto 0;
    position: absolute;
    top: 25px;
    left: -13px;
  }

  .imgx div img {
    width: 100%;
    height: 100%;
  }

  .info {
    border-bottom: 1px solid #ccc;
    display: flex;
    flex: 1;
  }

  .info div:nth-child(1) {
    width: 85%;
  }

  .info div:nth-child(2) {
    flex: 1;
    text-align: center;
    position: relative;
  }

  .info div:nth-child(2) span {
    display: inline-block;
    width: 120px;
    height: 53px;
    line-height: 53px;
    position: absolute;
    top: 22px;
    right: 0;
    border-radius: 5px;
    color: rgb(42, 212, 171);
    background-color: rgb(212, 246, 230);
  }

  .info div:nth-child(2) span:hover {
    background-color: rgb(234, 251, 243);

  }

  header {
    width: 894px;
    height: 78px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
  }

  header div {
    width: 214px;
  }

  header div span {
    color: #ccc;
  }

  header div span:nth-child(1) {
    margin-right: 20px;
  }

  header div span:nth-child(2)::after {
    content: "";
    width: 0;
    height: 0;
    display: inline-block;
    border: 5px solid transparent;
    border-top: 5px solid #666;
    margin-left: 2px;
  }

  footer {
    width: 894px;
    margin: 18px auto;
    text-indent: 125px;
    color: #ccc;
  }

  span:hover {
    cursor: pointer;
  }

  a {
    display: block;
    width: 120px;
    height: 53px;
    text-decoration: none;
    color: rgb(42, 212, 171);
  }
</style>

<body>
  <header>
    <div></div>
    <div>
      <span>帮助中心</span>
      <span>简体中文</span>
    </div>
  </header>
  <ul>
    <li>
      <div class="imgx">
        <div>
          <img src="./images/09.jpg" alt="" />
        </div>
      </div>
      <div class="info">
        <div>
          <p style="font-size: 18px">账号密码</p>
          <p style="color: rgb(127, 127, 168)">用于保护账号安全</p>
        </div>
        <div>
          <span class="first">
            <!-- <a href="./repassword.html">修改</a> -->
            <span class="ss1">修改</span>
          </span>
        </div>
      </div>
    </li>
    <li>
      <div class="imgx">
        <div><img src="./images/10.jpg" alt="" /></div>
      </div>
      <div class="info">
        <div>
          <p style="font-size: 18px">我的信息</p>
          <p style="color: rgb(127, 127, 168)">管理修改你的账户</p>
        </div>
        <div>
          <span>
            <!-- <a href="./reheaderimg.html">查看</a> -->
            <span class="ss2">查看</span>
          </span>
        </div>
      </div>
    </li>
    <li>
      <div class="imgx">
        <div><img src="./images/11.jpg" alt="" /></div>
      </div>
      <div class="info">
        <div>
          <p style="font-size: 18px">授权管理</p>
          <p style="color: rgb(127, 127, 168)">
            可以查看并管理您的账号的授权情况
          </p>
        </div>
        <div>
          <span>查看</span>
        </div>
      </div>
    </li>
    <li>
      <div class="imgx">
        <div><img src="./images/12.jpg" alt="" /></div>
      </div>
      <div class="info">
        <div>
          <p style="font-size: 18px">第三方绑定</p>
          <p style="color: rgb(127, 127, 168)">绑定第三方账号可以快捷登录</p>
        </div>
        <div>
          <span>查看</span>
        </div>
      </div>
    </li>
    <li>
      <div class="imgx">
        <div><img src="./images/13.jpg" alt="" /></div>
      </div>
      <div class="info">
        <div>
          <p style="font-size: 18px">实名认证</p>
          <p style="color: rgb(127, 127, 168)">
            实名认证可以完善你的账号信息安全，<span style="color: orange">建议立即设置</span>
          </p>
        </div>
        <div>
          <span style="background: rgb(42, 209, 129);color: #fff;">去认证</span>
        </div>
      </div>
    </li>
    <li>
      <div class="imgx">
        <div><img src="./images/14.jpg" alt="" /></div>
      </div>
      <div class="info">
        <div>
          <p style="font-size: 18px">紧急联系人</p>
          <p style="color: rgb(127, 127, 168)">能在找回密码过程中加强验证，让账号更安全，<span style="color: orange">建议立即添加</span< /p>
        </div>
        <div>
          <span style="background: rgb(42, 209, 129);color: #fff;">设置</span>
        </div>
      </div>
    </li>
  </ul>
  <footer>
    <p>
      © 2005 - 2022 广东欢太 版权所有 粤ICP备 14056724
      号-2联系方式：4001-999-666
    </p>
  </footer>
</body>
<script>

  var ss1 = document.querySelector(".ss1")
  var ss2 = document.querySelector(".ss2")


  var Cook = getCookie("users")
  ajax({
    type: "get",
    url: "http://localhost:3000/myself?id=" + Cook,
    success: res => {
      console.log(res)
      if (JSON.parse(res).code != 0) {
        location.href = "http://localhost:3000/login.html"
      }
    },
    error: code => {
      console.log("error", code);
    }
  })
  ss1.onclick = function () {
    ajax({
      type: "get",
      url: "http://localhost:3000/myself?id=" + Cook,
      success: res => {
        console.log(res)
        console.log(JSON.parse(res).code);
        if (JSON.parse(res).code == 0) {
          location.href = "http://localhost:3000/repassword.html";
        } else {
          location.href = "http://localhost:3000/login.html";
        }
      },
      error: code => {
        console.log("error", code);
      }
    })
  }







  ss2.onclick = function () {
    console.log("11")
    ajax({
      type: "get",
      url: "http://localhost:3000/myself?id=" + Cook,
      success: res => {
        console.log(res)
        console.log(JSON.parse(res).code);
        if (JSON.parse(res).code == 0) {
          location.href = "http://localhost:3000/reheaderimg.html";
        } else {
          location.href = "http://localhost:3000/login.html";
        }
      },
      error: code => {
        console.log("error", code);
      }
    })
  }
</script>

</html>